﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/AdminMaster.master" AutoEventWireup="true" CodeFile="CandidateStatus.aspx.cs" Inherits="CandidateStatus" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>



<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        .td {
            font-size: 12px;
            font-weight: normal;
            padding: 2px;
            color: #000;
            vertical-align: top;
        }

        .auto-style4 {
            height: 59px;
        }

        .hiddencol {
            display: none;
        }

        .viscol {
            display: block;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
    </asp:ScriptManager>
    <script type="text/javascript" lang="javascript">

        function RefreshParent() {
            document.getElementById("<%=mp1.ClientID %>").style("display:none");
            window.close();
        }
        function popup() {
            var WinSettings = "center:yes;resizable:no;dialogHeight:300px"
            // ALTER BELOW LINE - supply correct URL for Child Form
            var MyArgs = window.showModalDialog("CandidateFeeAllocation.aspx", WinSettings);
        }
        function Validate(sender, args) {
            var gridView = document.getElementById("<%=gvStatusDashboard.ClientID %>");
            var checkBoxes = gridView.getElementsByTagName("input");
            if (checkBoxes != undefined) {
                for (var i = 0; i < checkBoxes.length; i++) {
                    if (checkBoxes[i].type == "checkbox" && checkBoxes[i].checked) {
                        args.IsValid = true;
                        return;
                    }
                }
                args.IsValid = false;
            }
            else {
                args.IsValid = true;
                return;
            }
        }
        //////////////////////////////////////
        function checkAll(objRef, type) {

            if (type == 'H') {
                var GridView = objRef.parentNode.parentNode.parentNode;
                var inputList = GridView.getElementsByTagName("input");
                for (var i = 0; i < inputList.length; i++) {
                    var row = inputList[i].parentNode.parentNode;
                    if (inputList[i].type == "checkbox" && objRef != inputList[i]) {
                        if (objRef.checked) {
                            inputList[i].checked = true;
                        }
                        else {
                            inputList[i].checked = false;
                        }
                    }
                }
            }
            if (type == 'I') {
                var row = objRef.parentNode.parentNode;
                var GridView = row.parentNode;
                var inputList = GridView.getElementsByTagName("input");

                if (objRef.checked == false) {
                    var CA = $('#ContentPlaceHolder1_gvStatusDashboard_checkAll');
                    CA[0].checked = false;
                }
            }
        }
        function CallCodeBehindMethod() {
            pageName.CallClose(OnSuccess, OnFailed);
        }

        function OnSuccess(val) {

        }
        function OnSuccess(error) {

        }


    </script>
    <table style="margin-left: 60px; width: 100%;">
        <tr>
            <td colspan="2">
                <h2>Workflow Dashboard - Level 2</h2>
            </td>
        </tr>
        <tr>

            <td class="auto-style4"></td>
            <td class="auto-style4" style="vertical-align: central;">Candidate Status <font color="red"> *</font>&nbsp;&nbsp;: &nbsp;&nbsp;<asp:DropDownList ID="ddlCandidateStatus" runat="server" Width="375px" MaxLength="70" OnSelectedIndexChanged="ddlCandidateStatus_SelectedIndexChanged" DataValueField="StatusCode" AutoPostBack="true"></asp:DropDownList>
                &nbsp;
                <asp:RequiredFieldValidator ID="reqCandidateStatus" ControlToValidate="ddlCandidateStatus" runat="server" ErrorMessage="Select Candidate Status."></asp:RequiredFieldValidator>
            </td>

        </tr>
        <tr>
            <td colspan="2">
                <asp:Label runat="server" ID="lblErrorMessage"></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="Please select at least one registration." Display="Dynamic"
                    ClientValidationFunction="Validate" ForeColor="Red" ValidationGroup="Approve"></asp:CustomValidator>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:GridView ID="gvStatusDashboard" runat="server" DataKeyNames="CandidateID" AllowPaging="True" Width="90%" AutoGenerateColumns="False"
                    OnPageIndexChanging="gvStatusDashboard_PageIndexChanging" HeaderStyle-Height="30px" OnRowDataBound="gvStatusDashboard_RowDataBound">
                    <Columns>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                &nbsp;<asp:CheckBox ID="checkAll" runat="server" Text="All" TextAlign="Right" onclick="checkAll(this,'H');" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox type="checkbox" runat="server" ID="chkApproveSD" EnableViewState="true" onclick="checkAll(this,'I');" />
                                <%--<input type="checkbox" runat="server"  id="chkIsActive"  enableviewstate="true" />--%>
                            </ItemTemplate>
                            <ItemStyle Width="5%" />
                        </asp:TemplateField>
                        <%--0--%>
                        <asp:BoundField DataField="StatusID" HeaderText="StatusID" Visible="false" InsertVisible="true">
                            <ItemStyle HorizontalAlign="Left" Width="0%" />
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <%--1--%>

                        <asp:BoundField DataField="CandidateID" HeaderText="Candidate" Visible="false" InsertVisible="true">
                            <ItemStyle HorizontalAlign="Left" Width="0%" />
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <%--2--%>
                        <asp:BoundField DataField="RegistrationNo" HeaderText="&nbsp;&nbsp;Registration No">
                            <ItemStyle HorizontalAlign="Left" Width="20%" />
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <%--3--%>
                        <asp:BoundField DataField="CandidateName" HeaderText="&nbsp;&nbsp;Candidate Name">
                            <ItemStyle Width="20%" HorizontalAlign="Left" />
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <%--4--%>
                        <asp:BoundField DataField="CountryName" HeaderText="&nbsp;&nbsp;Country">
                            <ItemStyle Width="20%" HorizontalAlign="Left" />
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <%--5--%>
                        <asp:BoundField DataField="CompanyName" HeaderText="&nbsp;&nbsp;MR Company Name">
                            <ItemStyle Width="20%" HorizontalAlign="Left" />
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <%--7--%>
                        <asp:TemplateField ItemStyle-Width="10%" AccessibleHeaderText="View">
                            <ItemTemplate>
                                <asp:HyperLink runat="server"
                                    NavigateUrl='<%# GetViewtUrl(Eval("CandidateID"))%>'
                                    Text="View"></asp:HyperLink>
                                <%--<asp:HyperLinkField DataNavigateUrlFields="CandidateID" DataNavigateUrlFormatString="~/home/CandidateDetailsReg.aspx?CandidateID={0}"
                            HeaderText="&nbsp;&nbsp;View" Text="Details" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="left" />--%>
                            </ItemTemplate>

<ItemStyle Width="10%"></ItemStyle>
                        </asp:TemplateField>
                        <%--8--%>
                        <%--<asp:HyperLinkField DataNavigateUrlFields="CandidateID,BRIEFID" DataNavigateUrlFormatString="~/assessor/CandidateBriefDetailsAuditor.aspx?CandidateID={0}&briefid={1}"
                            HeaderText="Review" Text="Review" ItemStyle-Width="2%" ItemStyle-HorizontalAlign="Center" />--%>
                        <asp:TemplateField ItemStyle-Width="15%">
                            <ItemTemplate>
                                <asp:HyperLink runat="server"
                                    NavigateUrl='<%# GetReviewUrl(Eval("CandidateID"),Eval("BRIEFID"),Eval("CandidateAccType"),Eval("StatusID"))%>'
                                    Text="Review Detail"></asp:HyperLink>
                            </ItemTemplate>

<ItemStyle Width="15%"></ItemStyle>
                        </asp:TemplateField>
                        <%--9 to 8--%>
                        <asp:TemplateField ItemStyle-Width="15%" AccessibleHeaderText="Review">
                            <ItemTemplate>
                                <asp:HyperLink runat="server"
                                    NavigateUrl='<%# GetReviewUrl(Eval("CandidateID"),Eval("BRIEFID"),Eval("CandidateAccType"),Eval("StatusID"))%>'
                                    Text="Review"></asp:HyperLink>
                            </ItemTemplate>

<ItemStyle Width="15%"></ItemStyle>
                        </asp:TemplateField>
                        <%--10 to 9--%>
                        <asp:TemplateField ItemStyle-Width="15%" AccessibleHeaderText="Certificate">
                            <ItemTemplate>
                                <asp:HyperLink runat="server"
                                    NavigateUrl='<%# GetCertificateUrl(Eval("CandidateID"))%>'
                                    Text="Certificate"></asp:HyperLink>
                            </ItemTemplate>

<ItemStyle Width="15%"></ItemStyle>
                        </asp:TemplateField>
                        <%--11 to 10--%>
                        <asp:TemplateField ItemStyle-Width="15%" AccessibleHeaderText="Make Payment">
                            <ItemTemplate>
                                <asp:HyperLink runat="server"
                                    NavigateUrl='<%# GetMakePaymentUrl(Eval("CandidateID"),Eval("UserId"))%>'
                                    Text="Make Payment"></asp:HyperLink>
                                <%--   <asp:HyperLinkField DataNavigateUrlFields="CandidateID,UserId" DataNavigateUrlFormatString="~/Common/RegisterAlready.aspx?CandidateID={0}&UserId={1}&PayFromAdmin="
                            HeaderText="Make Payment" Text="Make Payment" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="left" />--%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:TemplateField>
                        <%--8 to 11--%>
                        <asp:TemplateField AccessibleHeaderText="Result Letter">
                             <ItemTemplate>
                                <asp:HyperLink runat="server"
                                    NavigateUrl='<%# GetCandidateResultUrl(Eval("CandidateID"))%>'
                                    Text="Result Letter"></asp:HyperLink>
                            </ItemTemplate>
                            <ItemStyle Width="15%"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField AccessibleHeaderText="Result Email">
                             <ItemTemplate>
                                <asp:HyperLink runat="server"
                                    NavigateUrl='<%# GetCandidateResultEmailUrl(Eval("CandidateID"))%>'
                                    Text="Result Email"></asp:HyperLink>
                            </ItemTemplate>
                            <ItemStyle Width="15%"></ItemStyle>
                        </asp:TemplateField>
                         <%--6--%>
                        <asp:BoundField DataField="CandidateAccName" HeaderText="Accreditation Type" >
                            <ItemStyle Width="20%" HorizontalAlign="Left" />
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="CandidateAccType" HeaderText="CandidateAccType" />
                         <asp:TemplateField HeaderText="RD Selection">
                            <ItemTemplate>
                                <asp:DropDownList ID="ddlRDAccName" runat="server" AutoPostBack="false" ></asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#E2DED6" ForeColor="blue" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#CCCCCC" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    <EmptyDataRowStyle ForeColor="Red" HorizontalAlign="Center" BorderStyle="None" BorderWidth="0" />
                    <EmptyDataTemplate>
                        No Candidate Available.
                    </EmptyDataTemplate>
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td align="center" colspan="2">
                <asp:Button ID="btnApproved" runat="server" Text="Approve" OnClick="btnApproved_Click" ValidationGroup="Approve" />
                &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="btnRejected" runat="server" Text="Reject" OnClick="btnRejected_Click" ValidationGroup="Approve" />
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:GridView ID="gvAssigningAssessor" runat="server"
                    AllowPaging="True" Width="100%" AutoGenerateColumns="False"
                    OnPageIndexChanging="gvAssigningAssessor_PageIndexChanging"
                    OnRowDataBound="gvAssigningAssessor_RowDataBound"
                    CellPadding="4" ForeColor="#333333"
                    OnRowCancelingEdit="gvAssigningAssessor_RowCancelingEdit"
                    OnRowEditing="gvAssigningAssessor_RowEditing" OnRowUpdating="gvAssigningAssessor_RowUpdating" HeaderStyle-Height="30px" OnRowCommand="gvAssigningAssessor_RowCommand">

                    <Columns>

                        <asp:TemplateField HeaderText="User ID" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lblUserID" runat="server" Text='<%# Eval("UserID") %>' Visible="false"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <%-- <asp:TemplateField HeaderText="StatusID" Visible="true" >
                           <ItemTemplate >
                                <asp:Label ID="lblStatusID" runat="server" Text='<%# Eval("StatusID") %>' Visible="false"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>--%>
                        <asp:TemplateField HeaderText="Candidate ID" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lblCandidateID" runat="server" Text='<%# Eval("CandidateID") %>' Visible="false"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <%-- <asp:HyperLinkField ItemStyle-Width="10%" NavigateUrl="~/RegisterAlready.aspx" DataTextField="RegistrationNo" HeaderText="Registration No"  />
                        --%>
                        <asp:TemplateField HeaderText="&nbsp;Registration No" ItemStyle-Width="10%">
                            <ItemTemplate>
                                <asp:Label ID="lblRegistrationNo" runat="server" Text='<%# Eval("RegistrationNo") %>'></asp:Label>
                            </ItemTemplate>

                            <ItemStyle Width="10%"></ItemStyle>
                        </asp:TemplateField>


                        <asp:TemplateField HeaderText="&nbsp;Candidate Name" ItemStyle-Width="20%">
                            <ItemTemplate>
                                <asp:Label ID="lblCandidateName" runat="server" Text='<%# Eval("CandidateName") %>'></asp:Label>
                            </ItemTemplate>

                            <ItemStyle Width="20%"></ItemStyle>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="&nbsp;Country Name" ItemStyle-Width="10%">
                            <ItemTemplate>
                                <asp:Label ID="lblCountryName" runat="server" Text='<%# Eval("CountryName") %>'></asp:Label>
                            </ItemTemplate>

                            <ItemStyle Width="10%"></ItemStyle>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="&nbsp;Candidate Type" ItemStyle-Width="10%">
                            <ItemTemplate>
                                <asp:Label ID="lblCandidateType" runat="server" Text='<%# Eval("CandidateType") %>'></asp:Label>
                            </ItemTemplate>

                            <ItemStyle Width="10%"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="&nbsp;Partner Name" ItemStyle-Width="10%">
                            <ItemTemplate>
                                <asp:Label ID="lblpartner" runat="server" Text='<%# Eval("PartnerName") %>' ></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Width="10%"></ItemStyle>
                        </asp:TemplateField>

                        <%--Drop Down Edit Start Assessor--%>
                        <asp:TemplateField HeaderText="&nbsp;Moderator Assessor" ItemStyle-Width="10%" Visible="false" InsertVisible="true">
                            <ItemTemplate>
                                <asp:Label ID="lblAssessor" runat="server"></asp:Label><br />
                                <asp:Label ID="lblAssessorFees" runat="server"></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:DropDownList ID="ddlAssessor" Width="150px" runat="server" OnSelectedIndexChanged="ddlAssessor_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
                                <asp:RequiredFieldValidator ID="reqddlAssessor" ControlToValidate="ddlAssessor" runat="server" Display="Dynamic" ErrorMessage="Select Assessor." ForeColor="Red" InitialValue="0"></asp:RequiredFieldValidator>

                                <asp:TextBox ID="txtAssessorFees" Width="150px" runat="server"></asp:TextBox>
                                &nbsp;
                                <asp:RequiredFieldValidator ID="reqAssessorFees" runat="server" ControlToValidate="txtAssessorFees" ErrorMessage="Enter Assessor Fees." ForeColor="Red" Display="Dynamic"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="rgAs" runat="server" ControlToValidate="txtAssessorFees" ErrorMessage="Please enter only numbers like 100 or 100.00"
                                    ValidationExpression="^\d+(\.\d\d)?$" ForeColor="red" Display="Dynamic"></asp:RegularExpressionValidator>
                            </EditItemTemplate>

                            <ItemStyle Width="10%"></ItemStyle>
                        </asp:TemplateField>
                        <%--Drop Down Edit End Assessor--%>
                        <%--Drop Down Edit Start Modirator--%>
                        <asp:TemplateField HeaderText="&nbsp;Research Lead Assessor" ItemStyle-Width="10%" Visible="false" InsertVisible="true">
                            <ItemTemplate>
                                <asp:Label ID="lblResearchLead" runat="server"></asp:Label><br />
                                <asp:Label ID="lblResearchLeadFees" runat="server"></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:DropDownList ID="ddlResearchLead" Width="150px" runat="server" OnSelectedIndexChanged="ddlResearchLead_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
                                <asp:RequiredFieldValidator ID="reqddlResearchLead" ControlToValidate="ddlResearchLead" runat="server" ErrorMessage="Select Research Lead." ForeColor="Red" InitialValue="0" Display="Dynamic"></asp:RequiredFieldValidator>

                                <asp:TextBox ID="txtResearchLeadFees" Width="150px" runat="server"></asp:TextBox>&nbsp;
                                <asp:RequiredFieldValidator ID="reqResearchLeadFees" ControlToValidate="txtResearchLeadFees" Display="Dynamic" runat="server" ErrorMessage="Enter Research Lead Fees." ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="rgRl" runat="server" ControlToValidate="txtResearchLeadFees" ErrorMessage="Please enter only numbers like 100 or 100.00"
                                    ValidationExpression="^\d+(\.\d\d)?$" ForeColor="red" Display="Dynamic"></asp:RegularExpressionValidator>
                            </EditItemTemplate>

                            <ItemStyle Width="10%" Wrap="true"></ItemStyle>

                        </asp:TemplateField>
                        <%--Drop Down Edit End Modirator--%>

                        <%--Drop Down Edit Start Auditor--%>
                        <asp:TemplateField HeaderText="&nbsp;Auditor" ItemStyle-Width="10%" Visible="false" InsertVisible="true">
                            <ItemTemplate>
                                <asp:Label ID="lblAuditor" runat="server"></asp:Label><br />
                                <asp:Label ID="lblAuditorFees" runat="server"></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:DropDownList ID="ddlAuditor" Width="150px" runat="server" OnSelectedIndexChanged="ddlAuditor_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
                                <asp:RequiredFieldValidator ID="reqddlAuditor" ControlToValidate="ddlAuditor" runat="server" Display="Dynamic" ErrorMessage="Select Auditor." ForeColor="Red" InitialValue="0"></asp:RequiredFieldValidator>

                                <asp:TextBox ID="txtAuditorFees" Width="150px" runat="server"></asp:TextBox>&nbsp;
                                <asp:RequiredFieldValidator ID="reqAuditorFees" ControlToValidate="txtAuditorFees" runat="server" Display="Dynamic" ErrorMessage="Enter Auditor Fees." ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="rgAt" runat="server" ControlToValidate="txtAuditorFees" Display="Dynamic" ErrorMessage="Please enter only numbers like 100 or 100.00"
                                    ValidationExpression="^\d+(\.\d\d)?$" ForeColor="red"></asp:RegularExpressionValidator>
                            </EditItemTemplate>

                            <ItemStyle Width="10%"></ItemStyle>
                        </asp:TemplateField>
                        
                        <%--Drop Down Edit End Auditor--%>
                        <%--Drop Down Edit Start Expert--%>
                        <asp:TemplateField HeaderText="&nbsp;Industry Expert" ItemStyle-Width="10%" Visible="false" InsertVisible="true">



                            <%--<ItemTemplate>
                                <asp:Label ID="lblExpert" runat="server"></asp:Label><br />
                                <asp:Label ID="lblExpertFees" runat="server"></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:DropDownList ID="ddlExpert" runat="server" OnSelectedIndexChanged ="ddlExpert_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
                                <asp:RequiredFieldValidator ID="reqddlExpert" ControlToValidate="ddlExpert" runat="server" Display="Dynamic" ErrorMessage="Select Expert." ForeColor="Red" InitialValue="0"></asp:RequiredFieldValidator>

                                <asp:TextBox ID="txtExpertFees" runat="server"></asp:TextBox>&nbsp;
                                <asp:RequiredFieldValidator ID="reqExpertFees" ControlToValidate="txtExpertFees" runat="server" Display="Dynamic" ErrorMessage="Enter Expert Fees." ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="rgEx" runat="server" ControlToValidate="txtExpertFees" Display="Dynamic" ErrorMessage="Please enter only numbers like 100 or 100.00" 
                                        ValidationExpression="^\d+(\.\d\d)?$" ForeColor="red"></asp:RegularExpressionValidator>
                            </EditItemTemplate>--%>

                            <ItemStyle Width="10%"></ItemStyle>



                            <EditItemTemplate>
                                <asp:DropDownList ID="ddlExpert" Width="150px" runat="server" OnSelectedIndexChanged="ddlExpert_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
                                <asp:RequiredFieldValidator ID="reqddlExpert" ControlToValidate="ddlExpert" runat="server" Display="Dynamic" ErrorMessage="Select Expert." ForeColor="Red" InitialValue="0"></asp:RequiredFieldValidator>

                                <asp:TextBox ID="txtExpertFees" Width="150px" runat="server"></asp:TextBox>&nbsp;
                                <asp:RequiredFieldValidator ID="reqExpertFees" ControlToValidate="txtExpertFees" runat="server" Display="Dynamic" ErrorMessage="Enter Expert Fees." ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="rgEx" runat="server" ControlToValidate="txtExpertFees" Display="Dynamic" ErrorMessage="Please enter only numbers like 100 or 100.00"
                                    ValidationExpression="^\d+(\.\d\d)?$" ForeColor="red"></asp:RegularExpressionValidator>
                            </EditItemTemplate>

                            <ItemTemplate>
                                <asp:Label ID="lblExpert" runat="server"></asp:Label><br />
                                <asp:Label ID="lblExpertFees" runat="server"></asp:Label>
                            </ItemTemplate>

                            <ItemStyle Width="10%"></ItemStyle>



                        </asp:TemplateField>
                       
                        <asp:TemplateField ItemStyle-Width="10%" AccessibleHeaderText="View">
                            <ItemTemplate>
                                <asp:HyperLink runat="server"
                                    NavigateUrl='<%# GetViewtUrl(Eval("CandidateID"))%>'
                                    Text="Details"></asp:HyperLink>
                                <%--<asp:HyperLinkField DataNavigateUrlFields="CandidateID" DataNavigateUrlFormatString="~/home/CandidateDetailsReg.aspx?CandidateID={0}"
                            HeaderText="&nbsp;&nbsp;View" Text="Details" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="left" />--%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                         
                       
                        <asp:TemplateField HeaderText="&nbsp;Allocate Assessor" ShowHeader="false">
                            <ItemTemplate>
                                <asp:LinkButton ID="btnPopUp" runat="server" CommandName="POPUP" Text="Allocate"
                                    CommandArgument='<%# Eval("CandidateID")+"="+Eval("RegistrationNo")+"="+Eval("CandidateType")+"="+Eval("CountryName")+"="+Eval("CandidateName")+"="+Eval("UserID")+"="+Eval("PartnerName") +"="+Eval("PartnerID") %>'></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="CandidateCode" ItemStyle-Width="10%" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lblCandidateCode" runat="server" Visible="true" Text='<%# Eval("CandidateCode") %>'></asp:Label>
                            </ItemTemplate>

                            <ItemStyle Width="10%"></ItemStyle>
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderText="PartnerID" ItemStyle-Width="10%" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lblPartnerID" runat="server" Visible="true" Text='<%# Eval("PartnerID") %>'></asp:Label>
                            </ItemTemplate>

                            <ItemStyle Width="10%"></ItemStyle>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#E2DED6" ForeColor="blue" HorizontalAlign="Center" />
                    <RowStyle CssClass="td" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#CCCCCC" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    <EmptyDataRowStyle ForeColor="Red" HorizontalAlign="Center" BorderStyle="None" BorderWidth="0" />
                    <EmptyDataTemplate>
                        No Candidate Available.
                    </EmptyDataTemplate>
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:Button runat="server" ID="btnNoUse" Text="" Style="display: none;" />
                <cc1:ModalPopupExtender ID="mp1" runat="server" PopupControlID="Panl1" TargetControlID="btnNoUse"
                    BackgroundCssClass="icon-white" OnCancelScript="return CallCodeBehindMethod();">
                </cc1:ModalPopupExtender>
                <asp:Panel ID="Panl1" runat="server" CssClass="Popup" align="center" BorderWidth="5px" Style="display: none" BackgroundCssClass="icon-white">
                    <iframe style="background-color: white; width: 1200px; height: 560px;margin-right:-3px" id="irm1" src="CandidateFeeAllocation.aspx" runat="server"></iframe>
                    <br />
                    <asp:Button ID="PopUpClose" runat="server" Text="Close" OnClick="PopUpClose_Click" />
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:GridView ID="gvAllocatedAssessor" runat="server" PageSize="10"
                    AllowPaging="true" Width="100%" AutoGenerateColumns="false"
                    OnPageIndexChanging="gvAllocatedAssessor_PageIndexChanging"
                    CellPadding="4" ForeColor="#333333"
                    HeaderStyle-Height="30px" BorderStyle="Solid">
                    <%--<HeaderStyle BackColor="Red" />--%>
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />

                    <Columns>

                        <asp:TemplateField HeaderText="User ID" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lblUserID" runat="server" Text='<%# Eval("UserID") %>' Visible="false"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Candidate ID" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lblCandidateID" runat="server" Text='<%# Eval("CandidateID") %>' Visible="false"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <%--<asp:HyperLinkField ItemStyle-Width="5%" NavigateUrl="~/RegisterAlready.aspx" DataTextField="RegistrationNo" HeaderText="Registration No"  />--%>

                        <asp:TemplateField HeaderText="&nbsp;Registration">
                            <ItemTemplate>
                                <asp:Label ID="lblRegistrationNo" runat="server" Text='<%# Eval("RegistrationNo") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="&nbsp;Candidate &nbsp;Name">
                            <ItemTemplate>
                                <asp:Label ID="lblCandidateName" runat="server" Text='<%# Eval("CandidateName") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="&nbsp;Country &nbsp;Name">
                            <ItemTemplate>
                                <asp:Label ID="lblCountryName" runat="server" Text='<%# Eval("CountryName") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="&nbsp;Candidate &nbsp;Type">
                            <ItemTemplate>
                                <asp:Label ID="lblCandidateType" runat="server" Text='<%# Eval("CandidateType") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField InsertVisible="true" Visible="false" HeaderText="&nbsp;Mod Assessor">
                            <ItemTemplate>
                                <asp:Label ID="lblAssessor" runat="server" Text='<%# Eval("RAM") %>'></asp:Label><br />

                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField InsertVisible="true" Visible="false" HeaderText="&nbsp;Mod Assessor &nbsp;Fees">
                            <ItemTemplate>

                                <asp:Label ID="lblAssessorFees" runat="server" Text='<%# Eval("RAMFees") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField InsertVisible="true" Visible="false" HeaderText="&nbsp;Research Lead">
                            <ItemTemplate>
                                <asp:Label ID="lblResearchLead" runat="server" Text='<%# Eval("RARL") %>' ItemStyle-Width="100px"></asp:Label><br />

                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField InsertVisible="true" Visible="false" HeaderText="&nbsp;Research &nbsp; Lead &nbsp;Fees">
                            <ItemTemplate>

                                <asp:Label ID="lblResearchLeadFees" runat="server" Text='<%# Eval("RARLFees") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField InsertVisible="true" Visible="false" HeaderText="&nbsp;Auditor">
                            <ItemTemplate>
                                <asp:Label ID="lblAuditor" runat="server" Text='<%# Eval("AD") %>'></asp:Label><br />

                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField InsertVisible="true" Visible="false" HeaderText="&nbsp;Auditor &nbsp;Fees">
                            <ItemTemplate>

                                <asp:Label ID="lblAuditorFees" runat="server" Text='<%# Eval("ADFees") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField InsertVisible="true" Visible="false" HeaderText="&nbsp;Industry Expert">
                            <ItemTemplate>
                                <asp:Label ID="lblExpert" runat="server" Text='<%# Eval("IE") %>'></asp:Label><br />

                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField Visible="false" HeaderText="&nbsp;Expert &nbsp;Fees">
                            <ItemTemplate>

                                <asp:Label ID="lblExpertFees" runat="server" Text='<%# Eval("IEFees") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>


                        <%-- <asp:HyperLinkField DataNavigateUrlFields="CandidateID" DataNavigateUrlFormatString="~/home/CandidateDetailsReg.aspx?CandidateID={0}"
                            HeaderText="&nbsp;Fee allotment View" Text="Details" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
                            <ItemStyle HorizontalAlign="Center" Width="5%"></ItemStyle>
                        </asp:HyperLinkField>--%>
                        <%--     <asp:HyperLinkField DataNavigateUrlFields="CandidateID" DataNavigateUrlFormatString="~/home/CandidateDetailsReg.aspx?CandidateID={0}"
                            HeaderText="&nbsp;View" Text="Details" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="left" />--%>
                        <asp:TemplateField ItemStyle-Width="10%" AccessibleHeaderText="View">
                            <ItemTemplate>
                                <asp:HyperLink runat="server"
                                    NavigateUrl='<%# GetViewtUrl(Eval("CandidateID"))%>'
                                    Text="Details"></asp:HyperLink>
                                <%--<asp:HyperLinkField DataNavigateUrlFields="CandidateID" DataNavigateUrlFormatString="~/home/CandidateDetailsReg.aspx?CandidateID={0}"
                            HeaderText="&nbsp;&nbsp;View" Text="Details" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="left" />--%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:TemplateField>
                        <%--<asp:HyperLinkField DataNavigateUrlFields="CandidateID" DataNavigateUrlFormatString="~/home/CandidateApprove.aspx?CandidateID={0}&CandidateStatusID=26&CandidateV=0"
                            HeaderText="&nbsp;Reject" Text="Reject" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
                            <ItemStyle HorizontalAlign="Center" Width="5%"></ItemStyle>
                        </asp:HyperLinkField>--%>
                        <asp:TemplateField ItemStyle-Width="10%" AccessibleHeaderText="Reject">
                            <ItemTemplate>
                                <asp:HyperLink runat="server"
                                    NavigateUrl='<%# GetRejectUrl(Eval("CandidateID"))%>'
                                    Text="Reject"></asp:HyperLink>
                                <%--<asp:HyperLinkField DataNavigateUrlFields="CandidateID" DataNavigateUrlFormatString="~/home/CandidateDetailsReg.aspx?CandidateID={0}"
                            HeaderText="&nbsp;&nbsp;View" Text="Details" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="left" />--%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <%-- <asp:HyperLinkField DataNavigateUrlFields="CandidateID" DataNavigateUrlFormatString="~/home/CandidateApprove.aspx?CandidateID={0}&CandidateStatusID=25&CandidateV=0"
                            HeaderText="&nbsp;Approve" Text="Approve" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
                            <ItemStyle HorizontalAlign="Center" Width="5%"></ItemStyle>
                        </asp:HyperLinkField>--%>
                        <asp:TemplateField ItemStyle-Width="10%" AccessibleHeaderText="Approve">
                            <ItemTemplate>
                                <asp:HyperLink runat="server"
                                    NavigateUrl='<%# GetApproveUrl(Eval("CandidateID"))%>'
                                    Text="Approve"></asp:HyperLink>
                                <%--<asp:HyperLinkField DataNavigateUrlFields="CandidateID" DataNavigateUrlFormatString="~/home/CandidateDetailsReg.aspx?CandidateID={0}"
                            HeaderText="&nbsp;&nbsp;View" Text="Details" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="left" />--%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#E2DED6" ForeColor="blue" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#CCCCCC" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    <EmptyDataRowStyle ForeColor="Red" HorizontalAlign="Center" BorderStyle="None" BorderWidth="0" />
                    <EmptyDataTemplate>
                        No Candidate Available.
                    </EmptyDataTemplate>
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td colspan="2"></td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: center; margin-right: 60px;">
                <asp:Button ID="btnBack" runat="server" Text="Back" OnClick="btnBack_Click" />

            </td>

        </tr>

    </table>
</asp:Content>

